﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using log4net.Config;


namespace Maxima.Common
{
    public static class LogEx
    {
        private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        static LogEx()
        {
            XmlConfigurator.Configure();
            Utility.VersionStamp();//Version of this release.
        }

        public static void Error(object msg)
        {
            log.Error(msg);
        }

        public static void Error(object msg, Exception ex)
        {
            log.Error(msg, ex);
        }

        public static void Error(Exception ex)
        {
            log.Error(ex.Message, ex);
        }

        public static void Info(object msg)
        {
            log.Info(msg);
        }
        public static void Info(string msg, params object[] args)
        {
            log.Info(string.Format(msg, args));
        }

    }
}
